package com.hpeng.basic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hpeng.basic.dao.CategoryDao;
import com.hpeng.basic.service.CategoryManagerDWR;
import com.hpeng.sys.model.Category;

@Component("categoryManagerDWR")
public class CategoryManagerDWRImpl implements CategoryManagerDWR {
	@Resource
	private CategoryDao categoryDao;

	public List<Category> findAllCategory() {
		/*
		List<Category> list = new ArrayList<Category>();
		List<Category> list2 = categoryDao.findAll();
		
		for(Category category : list2){
			Category cate = new Category();
			cate.setCatname(category.getCatname());
			cate.setCatactualstock(category.getCatactualstock());
			cate.setCatalias(category.getCatalias());
			cate.setCathighstock(category.getCathighstock());
			cate.setCatid(category.getCatid());
			cate.setCatlowstock(category.getCatlowstock());
			cate.setCatnorms(category.getCatnorms());
			cate.setCatsimplename(category.getCatsimplename());
			cate.setCatunit(category.getCatunit());
			//cate.setAssetCards(category.getAssetCards());
			list.add(cate);
		}
		return list;
		*/
		return categoryDao.getAll();
	}
	
	public void setCategoryDao(CategoryDao categoryDao) {
		this.categoryDao = categoryDao;
	}

}
